//
//  CopyPopView.m
//  TQY
//
//  Created by 甘世清 on 2024/7/9.
//

#import "CopyPopView.h"

@implementation CopyPopView
- (void)yc_addSubViews{
    self.backgroundColor = UIColor.whiteColor;
    self.layer.borderColor = SQColor3DA59D.CGColor;
    self.layer.borderWidth =  1;
    self.layer.cornerRadius = 20;
    self.layer.masksToBounds = YES;
    
    [self addSubview:self.messageLabel];
    [self.messageLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self).insets(UIEdgeInsetsMake(20, 20, 100, 20));
    }];
    [self addSubview:self.pingbiBtn];
    [self.pingbiBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(50);
        make.top.left.equalTo(self).offset(10);
    }];
    [self addSubview:self.leftButton];
    [self.leftButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(20);
        make.size.mas_equalTo(100);
        make.bottom.equalTo(self.mas_bottom).offset(-10);
    }];
    [self addSubview:self.loveBtn];
    [self.loveBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.mas_right).offset(-20);
        make.size.mas_equalTo(100);
        make.bottom.equalTo(self.mas_bottom).offset(-10);
    }];
   
    
}
- (void)setModel:(MottoModel *)model{
    _model = model;
    self.messageLabel.text = model.content;
    self.messageLabel.textAlignment = kCTTextAlignmentCenter;
    self.messageLabel.verticalAlignment = TYVerticalAlignmentCenter;
 
 
}

 


- (SQCustomButton *)loveBtn{
    if (!_loveBtn) {
        _loveBtn = [[SQCustomButton alloc]initType:SQCustomButtonTopImageType imageSize:CGSizeMake(60, 60) midmargin:0];
        _loveBtn.image = SQGetImage(@"xihuan");
      
    }
    return _loveBtn;
}
- (SQCustomButton *)leftButton{
    if (!_leftButton) {
        _leftButton = [[SQCustomButton alloc]initType:SQCustomButtonTopImageType imageSize:CGSizeMake(55, 55) midmargin:0];
        _leftButton.image = SQGetImage(@"quxiao");
    }
    return _leftButton;
}

- (SQCustomButton *)pingbiBtn{
    if (!_pingbiBtn) {
        _pingbiBtn = [[SQCustomButton alloc]initType:SQCustomButtonTopImageType imageSize:CGSizeMake(0, 0) midmargin:0];
        _pingbiBtn.text = SQNSLocalString(@"屏蔽");
        _pingbiBtn.textColor = SQColor3DA59D;
        _pingbiBtn.font = FONT_REGULAR(14);
    }
    return _pingbiBtn;
}

//- (SJCustomSelectTextView *)messageTextView{
//    if (!_messageTextView) {
//        _messageTextView = [[SJCustomSelectTextView alloc]init];
//        _messageTextView.backgroundColor = UIColor.whiteColor;
//        _messageTextView.layer.cornerRadius = 10;
//        _messageTextView.layer.masksToBounds = YES;
//        _messageTextView.font = FONT_BOLD(18);
//        _messageTextView.textColor = SQColor333333;
//        _messageTextView.editable = NO;
//        _messageTextView.selectable = YES;
//        _messageTextView.userInteractionEnabled = NO;
//    }
//    return _messageTextView;
//}
- (TYAttributedLabel *)messageLabel{
    if (!_messageLabel) {
        _messageLabel = [[TYAttributedLabel alloc]init];
        _messageLabel.backgroundColor = UIColor.clearColor;
        _messageLabel.characterSpacing = 2;
        _messageLabel.numberOfLines = 0;
        _messageLabel.linesSpacing = 2;
        _messageLabel.font = FONT_BOLD(18);
        _messageLabel.textColor = SQColor333333;
    }
    return _messageLabel;
}
@end
